/**
 * 
 */
package com.gragra.util.tests;
import static org.junit.Assert.*;
import org.junit.Test;
import com.gragra.util.ArraysExtended;
/**
 * @author Christoph Teichmann
 * created Mar 28, 2013 6:02:12 PM
 * @version 0.1
 */
public class TestArraysExtended
{
	/**
	 * Test method for {@link com.gragra.util.ArraysExtended#toString(java.lang.Object[])}.
	 */
	@Test
	public final void testToStringObjectArray()
	{assertEquals("[ [1, 2, 4], [ something, something ], [ [0.1, 0.3], [32, 54] ] ]",ArraysExtended.toString(new Object[] {new int[] {1,2,4},new String [] {"something","something"},new Object[] {new double[] {0.1,0.3},new long[] {32,54}}}));}
	/**
	 * Test method for {@link com.gragra.util.ArraysExtended#DeepCopy(java.lang.Object[])}.
	 */
	@Test
	public final void testDeepCopy()
	{
		Object[] arr = ArraysExtended.DeepCopy(new Object[] {new int[] {1,2,4},new String [] {"something","something"},new Object[] {new double[] {0.1,0.3},new long[] {32,54}}});
		assertEquals(arr.length,3);
		assertArrayEquals((int[]) arr[0],new int[] {1,2,4});
		assertArrayEquals((String[]) arr[1],new String[] {"something","something"});
		assertArrayEquals((long[]) ((Object[]) arr[2])[1],new long[] {32,54});
	}
}
